package com.example.night.data.Good;

import com.example.night.data.Good.GoodsRanking;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface GoodsRankingRepository extends JpaRepository<GoodsRanking, Long> {
    // 根据商品ID查询
    GoodsRanking findByGoodPackage_RelateProductId(String relateProductId);

    // 根据排名查找商品
    GoodsRanking findByRanking(int ranking);

    // 根据榜单类型和商品ID删除
    void deleteByGoodPackage_RelateProductId(String relateProductId);
}
